package com.example.coco.Controller;

import com.example.coco.res.AdminMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;

import java.util.Map;

@RestController
public class Delteadmin {

    @Autowired
    AdminMapper adminMapper;
    @RequestMapping("/deleteAdmin")
    @ResponseBody
    public Object deleteadmin(@RequestParam Map<String, Object> params){
        String id = (String) params.get("userid");
        adminMapper.deleteAdminuser(id);
        return new ModelAndView("Adminindex");
    }
}
